package com.ljdy.product.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.ljdy.product.dao.IProductRepository;
import com.ljdy.product.po.Product;
import com.ljdy.product.service.IProductService;

@Service
@Transactional
public class ProductService implements IProductService {

	@Autowired
	private IProductRepository productRepository;
	
	@Override
	public List<Product> findAll() {
		return productRepository.findAll();
	}

	@Override
	public void save(Product product) {
		productRepository.save(product);

	}

	@Override
	public void delete(Integer id) {
		productRepository.delete(id);

	}

}
